package Example;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * Author:  LiuTao
 * Version: 1.0
 * Date:    2023-12-19  09:07
 */
public class YangHuiTriangle {
    public static void main(String[] args) {
        int row = 5;
        for(int i = 0; i < row; i++) {
            int number = 1;
            for(int j = 0; j <= i; j++) {
                System.out.print(number + " ");
                number = number * (i - j) / (j + 1);
            }
            System.out.println();
        }
    }
}
